package com.ihr360.payroll.service.salary.jobexecution.impl;

import com.ihr360.job.core.entity.JobExecution;
import com.ihr360.job.core.repository.JobRepository;
import com.ihr360.job.core.repository.PageData;
import com.ihr360.payroll.service.salary.jobexecution.BatchJobExecutionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author tomtao
 */
@Service
public class BatchJobExecutionServiceImpl implements BatchJobExecutionService {

    @Autowired
    JobRepository jobRepository;

    @Override
    public PageData<JobExecution> getFailedJobExecution(int page, int size) {
        return jobRepository.getFailedJobExecution(page, size);
    }

    @Override
    public PageData<JobExecution> getJobExecution(int page, int size) {
        return jobRepository.getJobExecution(page, size);
    }

    @Override
    public PageData<JobExecution> getUnExceptedJobExecution(int page, int size) {
        return jobRepository.getUnExceptedJobExecution(page, size);
    }

    @Override
    public PageData<JobExecution> getLongTimeJobExecution(int page, int size, int minutes) {
        return jobRepository.getLongTimeJobExecution(page, size, minutes);
    }
}
